package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.OOP.tinhsongay;

public class DateModel {

	public int checkDay(Dateentity vDate) {
		int a = vDate.getA();
		int b = vDate.getB();
		if (a == 4 || a == 6 || a == 9 || a == 11) {
			return 30;
		} else if (a == 2) {
			if (b % 4 == 0&& b%100!=0 || b % 400 == 0) {
				return 29;
			} else {
				return 28;
			}

		}

		else {
			return 31;

		}
	}
}